<?php
namespace App\Model;
use App\Repository\Sys\Db;
use App\Repository\Sys\JsonRespose;
//广告位与banner 通用结构表
class BlockTable{
    use Db;
    static private $table = 'block';
    static public function getBlock($group_id){
        $table = BlockTable::ORM();
        if ($group_id) {
            $table->where('group_id', $group_id);
        }
        $res = $table->orderBy('group_id', 'desc')->get();
        return JsonRespose::jsonArray(1, $res);
    }
}